<div class="right_col" role="main">
<h3>th:text</h3>
<h1 th:text="${thymeleafTitle}">this is thymeleaf title</h1>
<p th:text="${thymeleafTitle}">this is the thymeleaf ti-tle</p>
<p>==================================================================</p>

<h3>th:if,th:unless.</h3>
<p th:if="${checked} == true">If true, this will display</p>
<p th:unless="${checked} == false">If not false, this will display</p>
<p th:if="${currentNumber}&lt;100">print if the currentNumber &lt;100</p>
<p th:if="${thymeleafTitle} == null">name is null</p>
<p>==================================================================</p>

<h3>th:attr</h3>
checkbox:<input type="text" th:attr="type=${changeType}" th:checked="${checked}"/>
<p>==================================================================</p>

<h3>url,href</h3>
<a th:href="@{http://www.baidu.com}" target="_blank">Click it to turn to baidu</a><br>
<a th:href="${baiduUrl}" target="_blank">Click it to turn to Shop beauty</a><br>
<!-- 封装动态url、url查询参数 -->
<a th:href="@{'/test/index/'+${city.cityId}}" th:text="${city.cityName}"></a>
<a th:href="@{/test/index(pageSize=${city.cityId},currentPage='1')}" th:text="${city.cityName}"></a>
<img th:src="@{${shopLogo}}"/>
<p>==================================================================</p>


<h3>th:object</h3>
<div th:object="${country}">
    <p th:text="*{countryId}">countryId</p>
    <p th:text="*{countryName}">countryName</p>
    <p th:text="${country.countryCode}">countryCode</p>
</div>
<p>==================================================================</p>

<h3>th:each</h3>
<table>
    <th>cityId</th><th>cityName</th><th>countryId</th>
    <tr th:each="city : ${cities}">
        <td th:text="${city.cityId}">cityId</td>
        <td th:text="${city.cityName}">cityName</td>
        <td th:text="${city.countryId}">countryId</td>
    </tr>
</table>
<select>
    <option th:each="city,cityStatus : ${cities}"
            th:value="${city.cityId}" th:text="${city.cityName}"></option>
</select>
<p>==================================================================</p>

<h3>post form, th:action, th:object, th:field</h3>
<!-- 我们可以指定是GET还是POST请求,这里需要注意的是有的浏览器并不支持PUT请求,SpringMVC为我们提供了一种解决方案,添加hidden指定method -->
<form th:action="${updateCityUri}" method="post" th:object="${city}">
    <input type="hidden" name="_method" value="PUT">
    City Id:			<input th:field="*{cityId}" readonly/>
    City Name: 			<input th:field="*{cityName}"/>
    Local City Name:	<input th:field="*{localCityName}"/>
    <button type="submit">Submit Info</button>
</form>
<p>==================================================================</p>


<h3>file upload and downlod</h3>
<a href="/test/file?fileName=qe.jpg">download file</a>

<br>

<p th:text="${message}"></p>
<p>上传文件，使用multipart/form-data类型</p>
<form action="/test/file" method="post" enctype="multipart/form-data">
    <input type="file" name="file">
    <button type="submit">上传</button>
</form>
<br>

<form action="/test/files" method="post" enctype="multipart/form-data">
    <input type="file" name="files">
    <input type="file" name="files">
    <button type="submit">上传</button>
</form>
<p>==================================================================</p>
</div>
